package com.dycx.cms.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dycx.cms.dto.ArticleDTO;
import com.dycx.cms.entity.ArticleDO;
import com.dycx.cms.vo.ArticleVO;
import com.dycx.user.vo.UserVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface ArticleService extends IService<ArticleDO> {

    /**
     * 删除
     */
    Boolean delete(Integer id);

    /**
     * 添加
     */
    Boolean add(ArticleDTO articleDto);

    /**
     * 更新
     */
    Boolean edit(ArticleDTO articleDto);

    /**
     * 分页
     */
    Page<ArticleVO> getPage(ArticleDTO articleDto);

    List<ArticleVO> setListData(List<ArticleVO> articleList, ArticleDTO dto);

    ArticleVO getDetailById(int id, Boolean status);

    List<ArticleVO> setAppData(List<ArticleVO> articleList, UserVO userVO);
}
